package com.netease.pris.activity.a;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.netease.image.d;
import com.netease.l.b.a;
import com.netease.pris.atom.g;
import com.netease.pris.atom.u;
import java.util.LinkedList;
import java.util.List;

public class m extends BaseAdapter
{
  private int a;
  private int b;
  private int c;
  private Context d;
  private LinkedList e;
  private LayoutInflater f;
  private View.OnClickListener g = null;

  public m(Context paramContext)
  {
    this.d = paramContext;
    this.a = com.netease.image.c.a(paramContext, 48.0F);
    this.b = this.a;
    this.f = ((LayoutInflater)paramContext.getSystemService("layout_inflater"));
  }

  private void a(r paramr, u paramu, int paramInt)
  {
    if ((paramr == null) || (paramu == null));
    while (true)
    {
      return;
      String str1 = paramu.aB();
      paramr.b.setText(str1);
      String str2 = paramu.X();
      paramr.c.setText(str2);
      String str3 = a.a(this.d, paramu);
      paramr.d.setText(str3);
      com.netease.pris.activity.view.c localc = new com.netease.pris.activity.view.c();
      localc.a = paramu.V();
      localc.b = paramInt;
      paramr.a.setTag(localc);
      String str4 = paramu.b(g.g);
      if (str4 == null)
      {
        paramr.a.setImageResource(2130837746);
        continue;
      }
      paramr.a.setImageResource(2130837746);
      StringBuilder localStringBuilder = new StringBuilder();
      paramr.b.setTag(localStringBuilder);
      d.a().a(localStringBuilder, 1, str4, new x(this, paramr), this.a, this.b, 2, this.c);
    }
  }

  public void a()
  {
    b();
    this.g = null;
    this.f = null;
    this.d = null;
  }

  public void a(int paramInt)
  {
    this.c = paramInt;
  }

  public void a(View.OnClickListener paramOnClickListener)
  {
    this.g = paramOnClickListener;
  }

  public void a(LinkedList paramLinkedList)
  {
    this.e = paramLinkedList;
  }

  public void a(List paramList)
  {
    if ((paramList == null) || (paramList.size() == 0));
    while (true)
    {
      return;
      synchronized (this.e)
      {
        for (int i = -1 + paramList.size(); i >= 0; i--)
          this.e.addFirst(paramList.get(i));
        notifyDataSetChanged();
      }
    }
  }

  public u b(int paramInt)
  {
    if ((this.e != null) && (this.e.size() > 0))
      if (paramInt >= this.e.size())
        paramInt = -1 + this.e.size();
    for (u localu = (u)this.e.get(paramInt); ; localu = null)
      return localu;
  }

  public void b()
  {
    synchronized (this.e)
    {
      this.e.clear();
      notifyDataSetChanged();
      return;
    }
  }

  public void b(List paramList)
  {
    if ((paramList == null) || (paramList.size() == 0));
    while (true)
    {
      return;
      synchronized (this.e)
      {
        this.e.addAll(paramList);
        notifyDataSetChanged();
      }
    }
  }

  public int getCount()
  {
    int i = 0;
    if (this.e != null)
      i = this.e.size();
    return i;
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    r localr2;
    if (paramView == null)
    {
      paramView = this.f.inflate(2130903073, null);
      localr2 = new r(this);
      localr2.a = ((ImageView)paramView.findViewById(2131558498));
      localr2.b = ((TextView)paramView.findViewById(2131558499));
      localr2.c = ((TextView)paramView.findViewById(2131558501));
      localr2.d = ((TextView)paramView.findViewById(2131558500));
      localr2.a.setFocusable(false);
      localr2.a.setClickable(true);
      localr2.a.setOnClickListener(this.g);
      paramView.setTag(localr2);
    }
    for (r localr1 = localr2; ; localr1 = (r)paramView.getTag())
    {
      u localu = b(paramInt);
      if (localu != null)
        a(localr1, localu, paramInt);
      return paramView;
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.a.m
 * JD-Core Version:    0.6.0
 */